﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Models;
using BLL;


namespace ReaManagementSystem.Controllers
{
    public class LandRController : Controller
    {
        // GET: LandR
        public ActionResult Login()
        {
            return View();
        }
        public ActionResult Registration()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Registration(User user)
        {
            if (ModelState.IsValid)
            {
                //User user = new User();

                //user.Name = Name;
                //user.Phone = Phone;
                //user.Password = Password;
                //user.ImgesUrl = "无.jpg";
                //user.Ban = "正常";

                if (UserManager.GetUserAdd(user))
                {
                    Response.Write("<script>alert('注册成功！')</script>");
                }
                else
                {
                    Response.Write("<script>alert('注册失败！')</script>");
                }
            }
            return View();
        }
    }
}